package Classes.GameUtils// ActionScript file
{
	import Classes.GameDatas.GD_AllFriends;
	import Classes.GameDatas.GD_HavenWall;
	import Classes.GameDatas.GD_HiredFriend;
	import Classes.GameDatas.GD_Item;
	import Classes.GameDatas.GD_Player;
	import Classes.GameDatas.GD_QQhz;
	import Classes.GameDatas.GD_Weapon;
	import Classes.GameViews.GV_Map;
	import Classes.GameViews.ViewDisplayers.MapTargets.MapMoveTargets.MMT_Character;
	import Classes.GameViews.ViewPanels.VP_DayRewardUI;
	import Classes.GameViews.ViewPanels.VP_DiePanel;
	import Classes.GameViews.ViewPanels.VP_Main;
	import Classes.GameViews.ViewPanels.VP_Make;
	import Classes.GameViews.ViewPanels.VP_RewardItemWindon;
	import Classes.GameViews.ViewPanels.VP_SevenDaysRewardUI;
	import Classes.GameViews.ViewPanels.VP_TextWinPanel;
	import Classes.GameViews.ViewPanels.VP_beathartWindon;
	import Classes.GameViews.ViewPanels.VP_errorPanel;
	import Classes.GameViews.ViewPanels.VP_getItems;
	import Classes.GameViews.ViewPanels.VP_message;
	import Classes.GameViews.ViewPanels.VP_movement;
	import Classes.GameViews.ViewPanels.VP_selectSex;
	import Classes.Interfaces.I_SendTarget;
	import Classes.Managers.M_ConfigData;
	import Classes.Managers.M_Timer;
	import Classes.staticinfo.Language;
	import Classes.staticinfo.StaticInfo;
	
	import UIComponents.FlatInfo;
	
	public class GU_MsgDeal
	{
		private static var _instance:GU_MsgDeal;
		public static var sendObj:Object;
		public static function dealMsg(msgsObj:Object,sendTarget:I_SendTarget):void
		{
			if(msgsObj.hasOwnProperty("token"))
			{
				StaticInfo.key=msgsObj["token"]
			}
//			trace("token元="+StaticInfo.key);
			if(msgsObj.hasOwnProperty("error"))
			{
				StaticInfo.key="";
			}
//			trace("token元="+StaticInfo.key);
			for each(var obj:Object in msgsObj)
			{
				for(var msgType:String in obj)
				{
					var dealObj:Object=obj[msgType];
					
					if(dealObj.hasOwnProperty("error"))
					{
						StaticInfo.key="";
						instance.dealError(dealObj.errorID);
					}
					else if(sendTarget)
					{
						dealObj.msgType=msgType;
						sendTarget.dealMsg(dealObj);
					}
					else
					{
						(instance["dealMsg_"+msgType] as Function)(dealObj);
					}
				}
			}
		}
		
		private function dealError(errorID:int):void
		{
			VP_errorPanel.instance.setErrorMessage(Language.failMsg);
			VP_errorPanel.instance.enterFrame();
			GU_Sound.instance.playCommSound("System_Prompt");	
		}
		
		/**
		 *登录响应 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_21000(msgObj:Object):void
		{
			GD_Player.instance.setPlayerID(msgObj.userID);
			GD_Player.instance.isNew=int(msgObj.isNew);
			GD_Weapon.defaultWeapon=Number(msgObj.weaponId);
		}
		
		/**
		 *服务器时间 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_21001(msgObj:Object):void
		{
			M_Timer.instance.setNowTime(msgObj.serverTime);
		}
		
		/**
		 * 围墙等级 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_25005(msgObj:Object):void
		{
			
		}
		
		/**
		 * 摆放建筑是否合法  暂时没有处理 
		 * @param msgObj
		 */		
		public function dealMsg_24002(msgObj:Object):void
		{
			
		}
		
		/**
		 * 武器装备栏改变
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_25008(msgObj:Object):void
		{
			VP_Make.instance.freshWeaponData();
			GD_Player.instance.touchObserve("addWeaponToEquipmentArea");
			if(FlatInfo.newGuiderQHWq)
			{
				GU_dealPower.instance.removeWQKArrow();
				//				FlatInfo.newGuiderQHWq=false;
			}
		}
		
		
		/**
		 * 操作结果反馈 
		 * @param msgObj
		 */		
		public function dealMsg_25000(msgObj:Object):void
		{
			var splitAry:Array;
			//1类型  弹字的
			if(String(msgObj.type)=="1")
			{	//	value	a-操作成功 b-免疫 
				switch(msgObj.value){
					case 'a':		
						VP_errorPanel.instance.setErrorMessage(Language.successMsg);
						VP_errorPanel.instance.enterFrame();
						break;
					case 'b':
						VP_errorPanel.instance.setErrorMessage("免疫");
						VP_errorPanel.instance.enterFrame();
						GU_Sound.instance.playCommSound("System_Prompt");
						break;
				}
				
			}
			// 2 弹框
			if(String(msgObj.type)=="2")
			{
				RewardWindons_deal.instance.hanldWinFun(VP_RewardItemWindon.instance,String(msgObj.value));
			}
			// 3 弹框 分享
			if(msgObj.type=="3")
			{
				GU_dealSharePreWin.instance.haldSharePreFun(msgObj.value);
				
			}
			//防沉迷弹框
			if(msgObj.type=="4")
			{
				var ary:Array	=	String(msgObj.value).split("-");
				//value a-防沉迷 	b,c,d,e参考language类
				
				switch(ary[0]){
					case 'a':VP_TextWinPanel.instance.openTextWindon(Language.playToLong,Language.rest);break;
					case 'b':
					case 'c':
					case 'd':
					case 'e':
						var printStr:String	= (Language["command_25000_4_"+ary[0]] as String).replace("@N",ary[1]);
//						if(M_ConfigData.instance.pullBack){
							GV_Map.instance.buildMode	=	GV_Map.MOVEMODE;
							VP_TextWinPanel.instance.openTextWindon("黑名单",printStr,
								function():void{GV_Map.instance.buildMode=GV_Map.CANNOTBUILDMODE;});
//						}
						break;
				}
				
			}
			
			//领取礼品超时
			if(msgObj.type=="5")
			{
				VP_errorPanel.instance.setErrorMessage(Language.messageNotLW);
				VP_errorPanel.instance.enterFrame();
				return;
			}
			
			//玩家升级
			if(msgObj.type=="6")
			{
				GU_dealSharePreWin.instance.playUpNewThings(msgObj);
			}
			//用户使用物品超标了
			if(msgObj.type=="7")
			{
				splitAry	=	String(msgObj.value).split("-");
				VP_errorPanel.instance.setErrorMessage(Language.enghtEat.replace("@num",splitAry[1]));
				VP_errorPanel.instance.enterFrame();
				return;
			}
			
			//玩家能量激素道具使用超过限制
			if(msgObj.type=="8")
			{
				splitAry	=	String(msgObj.value).split("-");
				VP_errorPanel.instance.setErrorMessage(Language.enghtJS.replace("@num",splitAry[1]));
				VP_errorPanel.instance.enterFrame();
				return;
			}
		}
		
		
		/**
		 *初始化玩家信息 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_21002(msgObj:Object):void
		{
			GD_Player.instance.setPlayerData(msgObj);
		}
		
		
		/**
		 *玩家等级变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22000(msgObj:Object):void
		{
			GD_Player.instance.playerLv=msgObj.value;
//			VP_beathartWindon.instance.openBeathartWin();
			GD_AllFriends.instance.getFriendInfoById(GD_Player.instance.playerID).friendLV=msgObj.value;
		}
		
		/**
		 * 玩家当前行动力上限
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22012(msgObj:Object):void
		{
			GD_Player.instance.playCurrentMaxActPoint=msgObj.value;
		}
		
		/**
		 * 玩家当前经验上限
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22011(msgObj:Object):void
		{
			GD_Player.instance.playerCurrentMaxExp=msgObj.value;
		}
		
		/**
		 *玩家经验变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22001(msgObj:Object):void
		{
			GD_Player.playNowExp=msgObj.value;
			GD_Player.instance.playerExp=msgObj.value;
		}
		
		/**
		 *玩家金钱变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22002(msgObj:Object):void
		{
			GD_Player.playNowMoney=Number(msgObj.value);
			GD_Player.instance.money=msgObj.value;
			GD_Player.instance.changeMIssions(msgObj.value,"101");
		}
		
		/**
		 *玩家代币变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22003(msgObj:Object):void
		{
			GD_Player.playNowOMoney=msgObj.value;
			GD_Player.instance.gold=msgObj.value;
		}
		
		/**
		 *玩家行动点变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22004(msgObj:Object):void
		{
			GD_Player.playerNowAction=msgObj.value;	
			if(msgObj.value<GD_Player.instance.playCurrentMaxActPoint && GD_Player.instance.closeTimerLister)
			{
				GD_Player.instance.touchObserve("fivePowerTimer");
			}else if(msgObj.value>=GD_Player.instance.playCurrentMaxActPoint && !GD_Player.instance.closeTimerLister){
				GD_Player.instance.touchObserve("quickCloseTimerLister");
			}
			GD_Player.instance.actPoint=msgObj.value;
		}
		
		/**
		 * 玩家血量变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22005(msgObj:Object):void
		{
			GD_Player.instance.playerLife=msgObj.value;
			if(msgObj.value<1)
			VP_DiePanel.instance.openPanel();	
		}
		
		/**
		 *主建筑等级变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22006(msgObj:Object):void
		{
			
		}
		
		/**
		 *避难所等级变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22007(msgObj:Object):void
		{
			
		}
		
		/**
		 *避难所状态变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22008(msgObj:Object):void
		{
			
		}
		
		/**
		 *增加僵尸 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22100(msgObj:Object):void
		{
			if(GD_Player.instance.character.characterState!=2)
			{
				GD_Player.instance.mapData.addZombies(msgObj.zombiesAry);
				GD_HavenWall.inbreakCheck();
			}
			
		}
		/**
		 *入侵状态 
		 * @param msgObj
		 * 
		 */
		public function dealMsg_24011(msgObj:Object):void
		{
			GD_HavenWall.setIsInbreak(msgObj.ztInfallStatue==1?true:false );
			//			GD_HavenWall.inbreakCheck();
		}
		
		
		/**
		 *僵尸血量变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22101(msgObj:Object):void
		{
			GD_Player.instance.zombieLifeChanged(msgObj);
		}
		
		/**
		 *建筑等级变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22200(msgObj:Object):void
		{
			
		}
		
		/**
		 *建筑升级
		 * @param msgObj
		 */		
		public function dealMsg_25006(msgObj:Object):void
		{
			GD_Player.instance.touchObserve(StaticInfo.CLOSE_EXPEND_LANDPANEL);
			GV_Map.instance.upBuilding(msgObj.value);
			if(Number(msgObj.value)==40101001)
			{
				GD_Player.instance.mapData.refreshWalls(GD_Player.instance.mapData.wallsAry,true);
			}
			GU_dealSharePreWin.instance.haldSharePreFun(12307);
		}
		
		/**
		 * 建筑位置变化 
		 * @param msgObj
		 */		
		public function dealMsg_22201(msgObj:Object):void
		{
			
		}
		
		/**
		 *增加一个装饰物 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22300(msgObj:Object):void
		{
			
		}
		
		/**
		 *装饰物位置变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22301(msgObj:Object):void
		{
			
		}
		
		/**
		 *增加一个病人 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22400(msgObj:Object):void
		{
			
		}
		
		/**
		 *开始治疗 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22401(msgObj:Object):void
		{
			
		}
		
		/**
		 *改变病人的治愈值 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22402(msgObj:Object):void
		{
			
		}
		
		/**
		 *删除病人 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22403(msgObj:Object):void
		{
			
		}
		
		/**
		 *改变病人的状态 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22404(msgObj:Object):void
		{
			
		}
		
		public function dealMsg_25007(msgObj:Object):void
		{
			GV_Map.instance.removeSundry(msgObj.sundryID,msgObj.sundryDur);
		}
		
		/**
		 *刷新围墙 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22500(msgObj:Object):void
		{
			GD_Player.instance.wallLv=msgObj.buildLevel;
			GD_Player.instance.touchObserve(StaticInfo.CLOSE_EXPEND_LANDPANEL);
			GD_Player.instance.mapData.refreshWalls(msgObj.wallsAry);
			GD_Player.instance.changeMIssions(msgObj.buildLevel,"105");
			GU_dealPower.instance.removeCenterBuild();
		}
		
		/**
		 *更改围墙耐久值 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22501(msgObj:Object):void
		{
			GV_Map.instance.repairWalls(msgObj.wallSerial,msgObj.value);
		}
		
		/**
		 *更改道具数量 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22600(msgObj:Object):void
		{
			if(msgObj.itemType==M_ConfigData.instance.toHomeItem)//快速回到家里
			{
				//如果数量是增加的 则不是使用
				var item:GD_Item=GD_Player.instance.getItemByType(msgObj.itemType);
				if(null==item || item.itemNumber<msgObj.value)
				{
//					return;
				}else{
					var mt:MMT_Character=GV_Map.instance.controlTarget as MMT_Character;
					mt.mapGrid=GV_Map.instance.getRandomGridForcharacter(mt.characterData);
					mt.setPosition(GV_Map.instance.getRandomGridForcharacter(mt.characterData));
					GD_Player.instance.tweenCenter();
				}
				//				GD_Player.instance.character.view.mapGrid=GV_Map.instance.getRandomGridForcharacter(GD_Player.instance.character);
//				return;
			}
			
			//加速移动
			if(msgObj.itemType==M_ConfigData.instance.addSpeedItem)
			{
				//如果数量是增加的 则不是使用
				var speedItem:GD_Item=GD_Player.instance.getItemByType(msgObj.itemType);
				if(null==speedItem || speedItem.itemNumber<msgObj.value)
				{
					
				}else{
					GD_Player.instance.speedTime=M_ConfigData.instance.addSpeedTimer*60;//5分钟
				}
			}
			
			GD_Player.instance.itemNumChanged(msgObj);
			
			GD_Player.instance.changeMIssions(msgObj.value,"102,103",msgObj.itemType);//提交物品,拥有物品
		}
		
		/**
		 *掉落奖励 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_22700(msgObj:Object):void
		{
			GD_Player.instance.creatDropRewards(msgObj);
		}
		
		/**
		 * 给玩家增加新的任务数据  
		 * @param msgObj
		 */		
		public function dealMsg_23000(msgObj:Object):void
		{
			GD_Player.instance.addMissions(msgObj.missionsAry);
		}
		
		/**
		 *删除任务 
		 * @param msgObj
		 * 
		 */
		public function dealMsg_23001(msgObj:Object):void
		{
			GU_Sound.instance.playCommSound("System_Task_Complete");
			GD_Player.instance.touchObserve(StaticInfo.COMPLETE_MISSION);
			Deal_SpecialMission.instance.hanldOverMisstion(msgObj,GD_Player.instance.deleteMission);
		}
		
		/**
		 * 任务计数器改变 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_23002(msgObj:Object):void
		{
			GD_Player.instance.setMissionNowValue(msgObj);
		}
		
		/**
		 *升级响应包 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_24000(msgObj:Object):void
		{
			
		}
		
		/**
		 *血量回满
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_24001(msgObj:Object):void
		{
			if(msgObj.value==1)
			{
				GD_Player.instance.character.finishCure();
			}
		}
		
		//		public function dealMsg_99999(msgObj:Object):void
		//		{
		//			GD_Player.instance.addMissions(msgObj.missionsAry);
		//		}
		
		public static function get instance():GU_MsgDeal
		{
			if(!_instance)_instance=new GU_MsgDeal;
			return _instance;
		}
		
		/**
		 * 任务开始领取  NPC(11) 跟 动画(12)
		 * @param msgObj
		 */	
		
		public function dealMsg_23003(msgObj:Object):void
		{
			Deal_SpecialMission.instance.hanldMIssion(msgObj);
		}
		
		
		/**
		 * 获得杂物、垃圾  ,npc
		 * @param msgObj
		 */		
		public function dealMsg_24012(msgObj:Object):void
		{
			if(GD_Player.instance.character.characterState!=2)
			{
				GD_Player.instance.mapData.addSundries(msgObj.sundriesAry);
			}
		}
		
		/**
		 * 玩家速度 变化
		 * @param msgObj
		 */		
		public function dealMsg_24022(msgObj:Object):void
		{
			if(msgObj.value<1)return;
			//			GD_Player.instance.character.view.speed=msgObj.value;
			GD_Player.instance.speed=msgObj.value;
		}
		
		//************************************黄钻命令******************************************************************
		/**
		 * 打开qq新手礼包 
		 * @param msgObj
		 */		
		public function dealMsg_24014(msgObj:Object):void
		{
			GD_QQhz.instance.openQqWin(msgObj);			
		}
		
		/**
		 *  改变QQ礼包状态
		 * @param msgObj
		 */		
		public function dealMsg_24016(msgObj:Object):void
		{
			var flag:int=int(msgObj.value);
			if(flag==1)
			{
				GD_Player.instance.isGetNewqqGift=0;
			}else if(flag==2)
			{
				GD_Player.instance.isGetDayqqGift=0;
			}
			
			GD_Player.instance.touchObserve("QQVip");
			
			VP_errorPanel.instance.setErrorMessage(Language.lqSuccess);
			VP_errorPanel.instance.enterFrame();
			GD_QQhz.instance.closeVipWin(flag);
		}
		
		public function dealMsg_24015(msgObj:Object):void
		{
			GD_QQhz.instance.setDayGifData(msgObj.dayGift,msgObj.yearGift);
		}
		
		
		//************************登陆礼包****************************
		
		public function dealMsg_24020(msgObj:Object):void
		{
			GD_Player.instance.dayRewardDays=int(msgObj.days);
			GD_Player.instance.dayRewardStatue=int(msgObj.statue);//1表示可以领取，0表示不可以领取
			VP_DayRewardUI.instance.isFensi=int(msgObj.fensi)==1?true:false;/*fensi 1表示是粉丝 0表示不是粉丝*/
		}
		
		public function dealMsg_24019(msgObj:Object):void
		{
			var statue:int=int(msgObj.statue);//1表示可以领取，0表示不可以领取
			GD_Player.instance.addPlayershuxing();
			VP_DayRewardUI.instance.closeHandler(null);
			VP_errorPanel.instance.setErrorMessage(Language.successMsg);
			VP_errorPanel.instance.enterFrame();
		}
		
		/**
		 * 给七日礼包赋值 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_24018(msgObj:Object):void
		{
			var tmparr:Array=msgObj.RewardsStatueAry as Array;
			if(null == tmparr || tmparr.length<1)
			{
				VP_Main.instance.controlSevenBtn(false);
			}else{
				var statue:int=int(msgObj.statue); //0:表示已经领取了  1：表示没有领取
				if(statue==0)
				{
					VP_SevenDaysRewardUI.instance.isLq=true;
					VP_Main.instance.controlPlaySevenBtn();
				}else{
					VP_SevenDaysRewardUI.instance.isLq=false;
				}
				VP_SevenDaysRewardUI.instance.sevensArr=tmparr;
			}
			
		}
		
		/**
		 * 领取七日礼包成功 
		 * @param msgObj
		 */		
		public function dealMsg_24017(msgObj:Object):void
		{
			VP_SevenDaysRewardUI.instance.isLq=true;
			//让动画不动
			VP_Main.instance.controlPlaySevenBtn();
			VP_SevenDaysRewardUI.instance.close();
			VP_errorPanel.instance.setErrorMessage(Language.successMsg);
			VP_errorPanel.instance.enterFrame();
			GU_Sound.instance.playCommSound("Button_Pressed");
		}
		
		/**
		 * 在线礼包成功 
		 * @param msgObj
		 */		
		public function dealMsg_24021(msgObj:Object):void
		{
			//			if(int(msgObj.statue)==0)return ;
			//			VP_errorPanel.instance.setErrorMessage(Language.successMsg);
			//			VP_errorPanel.instance.enterFrame();
			GU_Sound.instance.playCommSound("Button_Pressed");
			//设置下一次时间
			GD_Player.instance.onlineMinute=msgObj.num;
		}
		
		
		//************************************好友模块******************************************************************
		
		/**
		 * 雇佣好友 
		 * @param msgObj
		 */		
		public function dealMsg_25009(msgObj:Object):void
		{
			GD_AllFriends.instance.createHiredFirends(msgObj.hiredAry);
			GU_dealSharePreWin.instance.haldSharePreFun(127002);
		}
		
		/**
		 * 初始化被雇佣好友列表信息
		 * @param msgObj
		 */		
		public function dealMsg_29000(msgObj:Object):void
		{
			GD_AllFriends.instance.createHiredFirends(msgObj.hiredAry);
		}
		
		/**
		 * 雇佣好友   的行动力变化 
		 * @param msgObj
		 */		
		public function dealMsg_29001(msgObj:Object):void
		{
			(GD_AllFriends.instance.hiredFirendObj[msgObj.friendID] as GD_HiredFriend).actPoint=msgObj.value;
		}
		
		/**
		 * 雇佣好友 血量变化 
		 * @param msgObj
		 */		
		public function dealMsg_29002(msgObj:Object):void
		{
			(GD_AllFriends.instance.hiredFirendObj[msgObj.friendID] as GD_HiredFriend).character.life=msgObj.value;
		}
		
		/**
		 * (拜访)初始化好友信息 
		 * @param msgObj
		 */		
		public function dealMsg_28002(msgObj:Object):void
		{
			GD_AllFriends.instance.initVisiableFriend(msgObj);
		}
		
		/**
		 * 自己在好友家的友情行动力变化
		 * @param msgObj
		 */		
		public function dealMsg_27001(msgObj:Object):void
		{
			GD_Player.instance.friendAct=msgObj.value;
			
			
			if(int(msgObj.value)<1)
			{
				GU_dealSharePreWin.instance.haldSharePreFun(1111);
				
				(GD_AllFriends.instance.getFriendInfoById(GD_AllFriends.instance.currentVisableFriendId)).friendAct=msgObj.value;
				VP_Main.instance.interfaceUI["panelMain"]["reshow"]();
			}
		}
		
		/**
		 * 回家
		 * @param msgObj
		 */		
		public function dealMsg_28003(msgObj:Object):void
		{
			GD_Player.instance.gotoMyHome(msgObj);
		}
		
		
		/**
		 * 好友回放
		 * @param msgObj
		 */		
		public function dealMsg_24010(msgObj:Object):void
		{
			GD_AllFriends.instance.creatPlayerBackData(msgObj);
		}
		
		
		/**
		 *选择性名技能返回
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_24013(msgObj:Object):void
		{
			//			GD_Player.instance.playerSex=String(msgObj.sex);
			//			GD_Player.instance.currentWeapon=String(msgObj.weaponId);
			GD_Player.instance.createNewPlayerCharacter(msgObj.sex,msgObj.weaponId);
			VP_selectSex.instance.close();
			GD_Player.instance.playGameMusic();
		}
		
		
		//消息系统  加消息
		public function dealMsg_26001(msgObj:Object):void
		{
			if(msgObj.messagesAry==null)return;
			VP_message.instance.addMessageObjectFromAry(msgObj.messagesAry);
		}
		
		//删除一条旧消息
		public function dealMsg_26002(msgObj:Object):void
		{
			VP_message.instance.deleteMessageItem(msgObj.value);
		}
		
		//读取消息
		public function dealMsg_26003(msgObj:Object):void
		{
			VP_errorPanel.instance.setErrorMessage("读取成功");
			VP_errorPanel.instance.enterFrame();
			
			VP_message.instance.setShowBtn(msgObj.value,false);
		}
		
		//接受消息中物品成功
		public function dealMsg_26004(msgObj:Object):void
		{
			VP_errorPanel.instance.setErrorMessage(msgObj.value==1?"操作成功":"操作失败");
			VP_errorPanel.instance.enterFrame();
		}
		
		//*****************************玩家权限功能*******************************************
		/**
		 * 玩家权限变化 
		 * @param msgObj
		 * 
		 */		
		public function dealMsg_24023(msgObj:Object):void
		{
			var power:int=int(msgObj.value);
			if(msgObj.status==1)
			{
				GD_Player.instance.playPowerObj[power]=power;
				GU_dealPower.instance.haldNewGuideByPower(power);
			}else{
				delete GD_Player.instance.playPowerObj[power];
			}
		}
		
		//***********************************开服活动*********************************************
		/**
		 * 围猎僵尸
		 * @param msgObj
		 * 
		 */
		public function dealMsg_26005(msgObj:Object):void
		{
			//msgObj.yesItem;
			VP_movement.instance.diescore		=	msgObj.score;
			VP_movement.instance.dieReward		=	msgObj.noItem;//msgObj.noItem;
			VP_movement.instance.dieRewardYes	=	msgObj.yesItem;
			VP_movement.instance.updateBtn();
		}
		
		/**
		 * q点消耗值
		 * @param msgObj
		 */
		public function dealMsg_215003(msgObj:Object):void
		{
			GD_Player.instance.playerConsume	=	msgObj.value;
			VP_movement.instance.updateBtn();
		}
		
	}
}